package com.qunar.wan.email;

import com.qunar.wan.AppConfig;

import java.util.Properties;

/**
 * User: tongjie.yang Date: 13-11-27 Time: 上午10:45
 */
public class EmailEntity {
    // Email主机
    public static final String EMAIL_HOST = AppConfig.getItem("mail.host", "");
    // Email用户名
    public static final String EMAIL_USERNAME = AppConfig.getItem("mail.username", "");
    // Email 密码
    public static final String EMAIL_PASSWORD = AppConfig.getItem("mail.password", "");
    // 发件邮箱地址
    public static final String EMAIL_FROM = AppConfig.getItem("mail.from", "");
    // 权限验证
    public static final String EMAIL_SMTP_AUTH = AppConfig.getItem("mail.smtp.auth", "true");
    // 邮件超时时间
    public static final String EMAIL_SMTP_TIMEOUT = AppConfig.getItem("mail.smtp.timeout", "25000");
    // 邮件文本编码
    public static final String EMAIL_ENCODING = "UTF-8";

    public static final String EMAIL_SMTP_STARTTLS = AppConfig.getItem("mail.smtp.starttls.enable", "true");

    public static Properties properties = new Properties();

    static {
        properties.put("mail.smtp.auth", EMAIL_SMTP_AUTH);
        properties.put("mail.smtp.starttls.enable", EMAIL_SMTP_STARTTLS);
        properties.put("mail.smtp.timeout", EMAIL_SMTP_TIMEOUT);
    }

}
